import java.util.Scanner;

/**
 * @FileName Question6
 * @Description
 * @Author Sword
 * @date 2024-09-13
 **/
public class Question6 {
    public static void main(String[] args) {
        System.out.println("请输入一个数字");
        //创建Scanner对象
        Scanner sc = new Scanner(System.in);
        //调用nextInt方法接收数字
        int n = sc.nextInt();
        //定义求和变量
        int sum = 0;
        for (int i = 1; i <= n; i++) {
            sum = sum + (i * i);
        }

        //循环结束打印
        System.out.println(sum);
    }
}
